#!/usr/bin/ksh

# Script name: strpor.ksh

stringx=/usr/bin/local/bin

print "the string is $stringx"

print "Remove the right-most susbstring of stringx that matches /bin \${stringx%/bin} is ${stringx%/bin}"
print "Remove the largest right-most susbstring of stringx that matches /bin \${stringx%%/bin} is ${stringx%%/bin}"
print "Remove left-most susbstring of stringx that matches /bin \${stringx#/bin} is ${stringx#/bin}"
print "Remove the largest left-most susbstring of stringx that matches /bin \${stringx##/bin} is ${stringx##/bin}"
